<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="page" uri="http://www.aptech.com/pager"%>
<table class="table table-striped table-bordered bootstrap-datatable ">
	<thead>
		<tr role="row">
			<th class="sorting_asc" role="columnheader" tabindex="0"
				aria-controls="DataTables_Table_0" rowspan="1" colspan="1">序号</th>
			<th class="sorting" role="columnheader" tabindex="0"
				aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
				onclick="packsort('p.terminal.name',this)" sortrule="desc">终端名称</th>
			<th class="sorting" role="columnheader" tabindex="0"
				aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
				onclick="packsort('p.boxId',this)" sortrule="desc">柜号</th>
			<th class="sorting" role="columnheader" tabindex="0"
				aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
				onclick="packsort('p.userPhone',this)" sortrule="desc">用户手机</th>
			<th class="sorting" role="columnheader" tabindex="0"
				aria-controls="DataTables_Table_0" rowspan="1" colspan="1">用户名</th>
			<th class="sorting" role="columnheader" tabindex="0"
				aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
				onclick="packsort('p.parcelId',this)" sortrule="desc">快递单号</th>
			<th class="sorting" role="columnheader" tabindex="0"
				aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
				onclick="packsort('p.storeTime',this)" sortrule="desc">存入时间</th>
			<th class="sorting" role="columnheader" tabindex="0"
				aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
				onclick="packsort('p.getTime',this)" sortrule="desc">取出时间</th>
			<th class="sorting" role="columnheader" tabindex="0"
				aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
				onclick="packsort('timestampdiff(SECOND,p.getTime,p.storeTime)',this)"
				sortrule="desc">滞留时间</th>
			<th class="sorting" role="columnheader" tabindex="0"
				aria-controls="DataTables_Table_0" rowspan="1" colspan="1">验证码</th>
			<th class="sorting" role="columnheader" tabindex="0"
				aria-controls="DataTables_Table_0" rowspan="1" colspan="1">操作</th>
		</tr>
	</thead>

	<tbody>
		<s:iterator value="page.list" status="st">
			<tr class="odd">
				<td style="line-height: 60px;"><s:property value="#st.index+1" /></td>
				<td class="center" style="line-height: 60px;"><s:property
						value="terminal.name" /></td>
				<td class="center " style="line-height: 60px;"><s:property
						value="boxId" /></td>
				<td class="center " style="line-height: 60px;"><s:property
						value="userPhone" /></td>
				<td class="center " style="line-height: 60px;"><iframe
						class="packageOfusername"
						src="getUntakenParcel!getPackageInfos?packagenum=<s:property value="parcelId" />"
						scrolling="no" frameborder="0"></iframe></td>
				<td class="center "><s:property value="parcelId" /><br /> <img
					src="<%=request.getContextPath()%>/BarcodeServlet!doGet?msg=<s:property value="parcelId" />"
					height="50px" width=130px /></td>
				<td class="center" style="line-height: 60px;"><s:date
						name="storeTime" format="yyyy-MM-dd HH:mm:ss" /></td>
				<td class="center" style="line-height: 60px;"><s:date
						name="getTime" format="yyyy-MM-dd HH:mm:ss" /></td>
				<td class="center" style="line-height: 60px;"><s:property
						value="leftTime" /></td>
				<td class="center" style="line-height: 60px;"><s:property
						value="checkCode" /></td>
				<td class="center"><a
					href="getPackageCourier?courierID=<s:property value="courier.courierId" />">存件人详情
				</a><br /> <br /> <a href="javascript:void(0)" data-toggle="modal"
					data-target="#myModal" packnum="<s:property value="parcelId" />"
					class="waybill">运单详情</a></td>
			</tr>
		</s:iterator>
	</tbody>
</table>
<p>
	总记录数：<span class="pagesshow">${page.total}</span>条&nbsp;总页数：<span
		class="pagesshow">${page.allPage}</span>页&nbsp;每页条数： <input
		type="hidden" id="branchId" value="${branchId }" /><input
		type="hidden" id="curpage" value="${page.curpage}" /> <select
		class="typeahead" id="choicePagesize" style="width: 60px;">
		<s:iterator begin="1" step="1" end="10" status="index">
			<option value="<s:property value="(#index.index+1)*36"/>"
				<s:if test="(#index.index+1)*36==page.pageSize">selected="selected"</s:if>>
				<s:property value="(#index.index+1)*36" />
			</option>
		</s:iterator>
	</select>条&nbsp;当前第<span class="pagesshow">${page.curpage}/${page.allPage}</span>页&nbsp;
</p>
<div style="float: right; width: 630px;">
	<page:page pages="${page.allPage}" url="getUntakenParcel!getPackage"
		param="&branchId=${branchId }" curpage="${page.curpage}" pageIndex="7" />
</div>
